package YAPclient;

import YAPclient.sound.SoundList.SoundName;

/**
 * Interface for clients of the game YAP.
 * @author Daniel
 *
 */
public interface IClient {
	
	/**
	 * Returns the name of the client
	 * @return name of the client
	 */
	public String getName();
	/**
	 * Returns the IP-address
	 * @return the IP-address
	 */
	public String getIP();
	/**
	 * Returns the TCP-port of the client.
	 * @return TCP-port the client is listening to
	 */
	public int getPort();
	/**
	 * Returns the UDP-port of the client.
	 * @return the client's UDP-port
	 */
	public int getUdpPort();
	/**
	 * Returns <code>true</code> if the sound is enabled.
	 * @return <code>true</code> if the sound is enabled.
	 */
	public boolean getSound();
	/**
	 * Sets the name of the client.
	 * @param name the name of the client
	 */
	public void setName(String name);
	/**
	 * Sets the IP-address.
	 * @param ip IP-address to be set
	 */
	public void setIP(String ip);
	/**
	 * Sets the client's TCP-port
	 * @param port number of the port to be used
	 */
	public void setPort(int port);
	/**
	 * Sets the client's UDP-port
	 * @param port number of the port to be used
	 */
	public void setUdpPort(int port);
	/**
	 * Sets the sound either on or off.
	 * @param on boolean that is true if the sound is to be enabled
	 */
	public void setSound(boolean on);
	/**
	 * Plays a sound or music.
	 * @param sound sound or music to be played
	 */
	public void playSound(SoundName sound);
	/**
	 * Pauses all playing sounds.
	 */
	public void pauseSounds();
	/**
	 * Resumes all paused sounds.
	 */
	public void resumeSounds();
	/**
	 * Sets all the sounds back to the beginning of their line so that they can be played from the beginning again.
	 */
	public void clearSounds();
	/**
	 * Sets the sound for each constant in the enum SoundName. It is very important when implementing this method to first create the array sounds in SoundList
	 * and at the end of the method call the setSounds method of SoundName.
	 * @see YAPclient.sound.SoundList
	 * @see SoundName
	 */
	public void setUpSounds();
}
